package com.task.core.domain.info;

import com.task.core.domain.SysFileInfo;

import com.task.core.dto.response.SysFileInfoResponseDTO;
import lombok.Data;

/**
 * @author 迪迦.
 * @date 2025/2/10 14:18
 */
@Data
public class ClientScriptFileInfo {
  private String scriptFileName;

  private String scriptFileCode;

  private String scriptFileHash;

  private String scriptFileUrl;

  public ClientScriptFileInfo(SysFileInfo fileInfo) {
    this.scriptFileCode = fileInfo.getCode();
    this.scriptFileHash = fileInfo.getContent();
    this.scriptFileUrl = fileInfo.getUrl();
  }
  public ClientScriptFileInfo(SysFileInfoResponseDTO fileInfo) {
    this.scriptFileCode = fileInfo.getCode();
    this.scriptFileHash = fileInfo.getContent();
    this.scriptFileUrl = fileInfo.getUrl();
    this.scriptFileName =fileInfo.getShowName();
  }
}
